/**************************************
* TABLE A2: Female Staff Composition
**************************************/
* house 
clear
use masterdata_house1.dta

gen femalestaff = 0
replace femalestaff = 1 if gender =="F"

gen female = 0
replace female = 1 if minwomen + majwomen > 0

gen group = .
replace group = 1 if dem == 1 & female == 1
replace group = 2 if dem == 1 & female == 0
replace group = 3 if dem == 0 & female == 1
replace group = 4 if dem == 0 & female == 0

tab rank femalestaff, row
tab rank femalestaff if group ==1, row
tab rank femalestaff if group ==2, row
tab rank femalestaff if group ==3, row
tab rank femalestaff if group ==4, row

* senate
clear
use masterdata_senate1.dta

gen femalestaff = 0
replace femalestaff = 1 if gender =="F"

gen female = 0
replace female = 1 if minwomen + majwomen > 0

gen group = .
replace group = 1 if dem == 1 & female == 1
replace group = 2 if dem == 1 & female == 0
replace group = 3 if dem == 0 & female == 1
replace group = 4 if dem == 0 & female == 0

tab rank femalestaff, row
tab rank femalestaff if group ==1, row
tab rank femalestaff if group ==2, row
tab rank femalestaff if group ==3, row
tab rank femalestaff if group ==4, row

